I have recently begun administering a database where use of system login names is enabled, but none of them are set. As a minor convenience to users, I would like to set these so that they don't have to type their usernames every time they log in. (Passwords are still required.) Since the user names are currently identical to their system login names (I have not verified this to be 100% the case), I'm pretty sure I can do this in three lines. But before doing something with this much scope I guess I'd appreciate a peer review:
User u
for u in userList do {
u.systemLoginName = u.name
}
Does anyone see any issues with this? JSRowland - Thu Dec 22 19:38:22 EST 2016 |
Re: Mass Update of systemLoginName Ended up running the following: User u
int i = 0;
string sName;
for u in userList do {
loadUserRecord(u);
sName = u.name
print sName "\n"
u.systemLoginName = sName;
u.email = sName "@XXX"
saveUserRecord(u);
i++;
}
saveDirectory();
print "\n" i " accounts updated."
No complaints from users yet, and the few accounts I've spot checked seem to be in order. |